import {
	createRouter,
	createWebHashHistory
} from 'vue-router'
import HomeView from '../views/HomeView.vue'
import LoginVue from '../views/LoginVue.vue'
import MenuLan from '../views/MenuLan.vue'

const routes = [
	{
		path: '/home',
		name: 'home',
		component: HomeView
	},
	{
		path: '/menu',
		name: 'menu',
		component: MenuLan
	},
	{
		path: '/',
		name: 'login',
		component: LoginVue
	},
	{
		path: '/about',
		name: 'about',
		// route level code-splitting
		// this generates a separate chunk (about.[hash].js) for this route
		// which is lazy-loaded when the route is visited.
		component: () => import( /* webpackChunkName: "about" */ '../views/AboutView.vue')
	}
]

const router = createRouter({
	history: createWebHashHistory(),
	routes
})

export default router